home *** CD-ROM | disk | FTP | other *** search
/ Ham Radio 2000 #2 / Ham Radio 2000 - Volume 2.iso / HAMV2 / MISC / HCAL-27 / INDUHOSE.BAS (.txt) < prev    next >
Encoding:
GW-BASIC  |  1997-01-28  |  4.9 KB  |  174 lines

  1. 10  'INDUHOSE - Inductance of dryer hose - 15 NOV 94  rev. 05 JAN 97
  2. 20  CLS:KEY OFF
  3. 30  IF EX$=""THEN EX$="EXIT"
  4. 40  COLOR 7,0,1
  5. 50  '
  6. 60  '.....start
  7. 70  CLS
  8. 80  GOSUB 1130    'preface text
  9. 90  LOCATE 25,23
  10. 100  COLOR 0,7
  11. 110  PRINT " Press 1 to continue or 0 to EXIT ";
  12. 120  COLOR 7,0
  13. 130  Z$=INKEY$:IF Z$="" THEN 130
  14. 140  IF Z$="0"THEN CLS:RUN EX$
  15. 150  IF Z$="1"THEN 170
  16. 160  GOTO 130
  17. 170  GOSUB 1610   'dump screen
  18. 180  '
  19. 190  CLS
  20. 200  D=4.125         'coil diameter
  21. 210  L=1.5*D         'coil default length
  22. 220  U1$="#####.###"
  23. 230  UL$=STRING$(80,205)
  24. 240  E$=STRING$(80,32)
  25. 250  I=0     'increment counter(for debugging purposes only)
  26. 260  '
  27. 270  '.....inductance input
  28. 280  COLOR 15,2
  29. 290  PRINT " INDUCTORS - Made From 4";CHR$(34);" Flexible Dryer Vent Hose";
  30. 300  PRINT TAB(57);"by George Murphy VE3ERP ";
  31. 310  COLOR 1,0:PRINT STRING$(80,223);
  32. 320  COLOR 0,7
  33. 330  PRINT " DESIGN PARAMETERS: "
  34. 340  COLOR 7,0
  35. 350  '
  36. 360  INPUT " ENTER: Inductance ( 33.1 MHz to 1145.9 MHz )....";U
  37. 370  IF U=0 THEN 390
  38. 380  IF U>=33.1 AND U<=1145.9 THEN 410
  39. 390  LOCATE CSRLIN-1:PRINT E$;:LOCATE CSRLIN-1:GOTO 360
  40. 400  '
  41. 410  '.....calculate
  42. 420  LOCATE CSRLIN-1:PRINT E$;:LOCATE CSRLIN-1
  43. 430  IF L=0 AND N*U<>0 THEN L=(D^2*N^2/U-18*D)/40
  44. 440  IF N=0 AND L*U<>0 THEN N=SQR((U*(18*D+40*L))/D^2)
  45. 450  IF U=0 AND L*N<>0 THEN U=D^2*N^2/(18*D+40*L)
  46. 460  I=I+1     'increment counter
  47. 470  IF L*N*U THEN 490
  48. 480  '
  49. 490   IF L<1.65 THEN L=1.65:N=0:GOTO 440
  50. 500   IF L>8.25 THEN L=8.25:N=0:GOTO 440
  51. 510  R=L/D     'length-to-diameter ratio
  52. 520   IF R<0.4 THEN L=0.4*D:N=0:GOTO 440
  53. 530   IF R>2 THEN L=2*D:N=0:GOTO 440
  54. 540  T=N/L     'turns per inch
  55. 550   IF T<10 THEN L=N/10:N=0:GOTO 440
  56. 560   IF T>20 THEN L=N/20:N=0:GOTO 440
  57. 570  S=L/N     'turn spacing
  58. 580  '
  59. 590  '.....screen print
  60. 600  VIEW PRINT 3 TO 24:CLS:VIEW PRINT:LOCATE 3
  61. 610  COLOR 0,7:PRINT " DESIGN PARAMETERS: ":COLOR 7,0
  62. 620  '
  63. 630  PRINT "        Inductance...........................";USING U1$;U;
  64. 640  PRINT " >H"
  65. 650  PRINT "        Coil diameter........................";USING U1$;D;
  66. 660  PRINT CHR$(34)
  67. 670  PRINT "        Coil length..........................";USING U1$;L;
  68. 680  PRINT CHR$(34)
  69. 690  R=L/D
  70. 700  PRINT "        Length-to-Diameter ratio.............";USING U1$;R;
  71. 710  PRINT ":1";
  72. 720  IF R>2 THEN COLOR 15,6:PRINT " * ";
  73. 730  IF R<0.4 THEN COLOR 15,6:PRINT " ** ";
  74. 740  COLOR 7,0:PRINT ""
  75. 750  PRINT "        Number of turns......................";USING U1$;N
  76. 760  T=N/L
  77. 770  PRINT "        Turns per inch.......................";USING U1$;T
  78. 780  S=L/N
  79. 790  PRINT "        Turn spacing.........................";USING U1$;S;
  80. 800  PRINT CHR$(34);
  81. 810  PRINT UL$;
  82. 820  '
  83. 830  '.....end
  84. 840  IF N=INT(N)THEN 1030
  85. 850  COLOR 15,1:LOCATE 22,8
  86. 860  PRINT " Do you want to adjust design for";CINT(N);"full turns?   (y/n)";
  87. 870  PRINT STRING$(13,32)
  88. 880  COLOR 7,0
  89. 890  Z$=INKEY$
  90. 900  IF Z$="n"THEN LOCATE CSRLIN-1:PRINT E$;:GOTO 1030
  91. 910  IF Z$="y"THEN LOCATE CSRLIN-1:PRINT E$;:GOTO 940
  92. 920  GOTO 890
  93. 930  '
  94. 940  '.....recalculate length
  95. 950  N=CINT(N)
  96. 960  L=((D^2*N^2/U)-(18*D))/40
  97. 970  VIEW PRINT 11 TO 24:CLS:VIEW PRINT:LOCATE 11
  98. 980  PRINT
  99. 990  COLOR 0,7:PRINT " DESIGN ADJUSTED FOR";N;"FULL TURNS: "
  100. 1000  COLOR 7,0
  101. 1010  GOTO 630
  102. 1020  '
  103. 1030  '.....quit
  104. 1040  VIEW PRINT 20 TO 24:CLS:VIEW PRINT:LOCATE 21
  105. 1050  PRINT " Dryer Vent coils tend to be somewhat lossy. To reduce losses ";
  106. 1060  PRINT "remove all fabric"
  107. 1070  PRINT " covering & secure coil turns by gluing to 3 longitudinal ";
  108. 1080  PRINT "dowels."
  109. 1090  GOSUB 1610
  110. 1100  N=0:GOTO 30   'start
  111. 1110  END
  112. 1120  '
  113. 1130  '.....preface
  114. 1140  COLOR 0,7:PRINT " DRYER HOSE INDUCTORS ":COLOR 7,0
  115. 1150  TB=8
  116. 1160  PRINT
  117. 1170  PRINT TAB(TB);
  118. 1180  PRINT "  Most flexible dryer hoses have a 4-1/8 inch diameter spiral wire"
  119. 1190  PRINT TAB(TB);
  120. 1200  PRINT "skeleton designed to fit over a 4.00 inch O.D. vent pipe. This"
  121. 1210  PRINT TAB(TB);
  122. 1220  PRINT "program designs 4.125 inch diameter coils made from this type and"
  123. 1230  PRINT TAB(TB);
  124. 1240  PRINT "size of dryer vent hose."
  125. 1250  PRINT TAB(TB);
  126. 1260  PRINT "  Most dryer hoses can be compressed to about 20 Turns-Per-Inch."
  127. 1270  PRINT TAB(TB);
  128. 1280  PRINT "10 T.P.I. has been arbitrarily selected as the minimum allowable"
  129. 1290  PRINT TAB(TB);
  130. 1300  PRINT "T.P.I. for the close-wound coil design formulae to retain"
  131. 1310  PRINT TAB(TB);
  132. 1320  PRINT "reasonable accuracy."
  133. 1330  PRINT TAB(TB);
  134. 1340  PRINT "  This program designs close-wound coils from 10 to 20 T.P.I. which"
  135. 1350  PRINT TAB(TB);
  136. 1360  PRINT "limits coil length to the range of from 1.65 to 8.25 inches."
  137. 1370  PRINT TAB(TB);
  138. 1380  PRINT "  The program initially assumes a coil length-to-diameter ratio"
  139. 1390  PRINT TAB(TB);
  140. 1400  PRINT "of 1.5:1, which will provide an acceptable Q for most amateur"
  141. 1410  PRINT TAB(TB);
  142. 1420  PRINT "radio applications. The initial default coil length of 6.188 inches"
  143. 1430  PRINT TAB(TB);
  144. 1440  PRINT "is automatically recalculated as required to fit within the T.P.I."
  145. 1450  PRINT TAB(TB);
  146. 1460  PRINT "limitations described above."
  147. 1470  PRINT TAB(TB);
  148. 1480  PRINT "  The program has been calibrated to design coils in the range"
  149. 1490  PRINT TAB(TB);
  150. 1500  PRINT "of 33.1 >H to 1145.9 >H within the generally accepted length-to-"
  151. 1510  PRINT TAB(TB);
  152. 1520  PRINT "diameter ratio limits of from 0.4:1 to 2.0:1."
  153. 1530  PRINT TAB(TB);
  154. 1540  PRINT "  Connections to the coil should be made with clamp type fittings"
  155. 1550  PRINT TAB(TB);
  156. 1560  PRINT "or binding posts because the spring steel wire in the coil and"
  157. 1570  PRINT TAB(TB);
  158. 1580  PRINT "the thin plastic hose fabric do not take too kindly to soldering."
  159. 1590  RETURN
  160. 1600  '
  161. 1610  'HARDCOPY
  162. 1620  GOSUB 1730:LOCATE 25,2:COLOR 14,6
  163. 1630  PRINT " Press 1 to print screen, 2 to print screen & ";
  164. 1640  PRINT "advance paper, or 3 to continue.";:COLOR 7,0
  165. 1650  Z$=INKEY$:IF Z$="3"THEN GOSUB 1730:RETURN
  166. 1660  IF Z$="1"OR Z$="2"THEN GOSUB 1730:GOTO 1680
  167. 1670  GOTO 1650
  168. 1680  FOR QX=1 TO 24:FOR QY=1 TO 80
  169. 1690  LPRINT CHR$(SCREEN(QX,QY));
  170. 1700  NEXT QY:NEXT QX
  171. 1710  IF Z$="2"THEN LPRINT CHR$(12)
  172. 1720  GOTO 1620
  173. 1730  LOCATE 25,1:PRINT STRING$(80,32);:RETURN
  174.